1. Technical Field
The present disclosure relates to an electronic apparatus, more particular, to a function unit, an electronic apparatus, and a power-down method thereof, for preventing malfunction resulting from hard powering down the electronic apparatus.
2. Description of Related Art
As technology advances, handheld electronic devices, such as smart phones, MP3 player, and personal digital assistants (PDAs) have become increasingly popular and widespread. As the industry continues to develop a variety of features and functions, such as the media player, for these devices. Handheld electronic devices have gradually become indispensable necessities in the modern life.
However, as the industry continues to add more and more features and functions to the handheld electronic devices, the overall complexity of the handheld electronic devices and operational loadings on the processing unit thereof increases as well. Moreover, the handheld electronic device may crash when the processing unit overloads. The conventional handheld electronic devices are equipped with hard power down mechanism for forcing the handheld electronic device to shutdown. However the conventional hard power down mechanism merely forcing the handheld electronic device to shut-down and restart by interrupting the operating power supplied. Under this method, internal circuits could easily generate errors and become malfunction due to sudden interruption of power.
For example, please refer to FIG. 1, which shows a diagram of a conventional electronic apparatus. The electronic apparatus 1 includes a switch 11, a processing unit 12, an audio codec 13, a power management unit 14, a battery 15, and a resistor R. A first end of the resistor R is coupled to a logic high level V+. A first end of the switch 11 is coupled to a second end of the resistor R, and a second end of the switch 11 is coupled to a logic low level V−. When the switch 11 is closed (e.g., being pressed), the first end and the second end of the switch 11 conduct; when the switch 11 is opened (e.g., not being pressed), the first end and the second end of the switch 11 are electrically isolated from each other. The processing unit 12 is coupled to the first end of the switch 11. The processing unit 12 is further coupled to the power management unit 14, and the audio codec 13. The processing unit 12 and the audio codec 13 further receive driving voltages 1.8V/3.3V/5V, which are supplied by the power management unit 14. The power management unit 14 is coupled to one end of the battery 15, and the other end of the battery 15 is coupled to a ground. Additionally, a speaker 16 and a headphone 17 are coupled to the audio codec 13 of the electronic apparatus 1.
Please refer to FIG. 2 in conjunction with FIG. 1, wherein FIG. 2 shows a waveform diagram illustrating an operation of the conventional electronic apparatus. When the switch 11 has been pressed by a user, a switch signal generated by the switch 11 would change from a logic high level V+ (e.g., 5V) to a logic low level V− (e.g., 0V). The processing unit 12 generates and outputs a power-down signal to the power management unit 14 to drive the power management unit 14 to stop supplying driving voltages T1 seconds after detected that the switch signal has changed from a logic high level V+ to a logic low level V−. As can be noted from point A of FIG. 2, after T1 seconds, the driving voltage signal transits from a logic high level V+ to a low voltage level and the power management unit 14 stop supplying driving voltages. As a result, driving voltages being supplied to the processing unit 12 and the audio codec 13 are interrupted, and the control signal outputted by the processing unit 12 for controlling the operation of the audio codec 13 is also interrupted at the same time.
When the control signal for controlling the operation of the audio codec 13 is suddenly interrupted, the speaker 16 and the headphone 17 being coupled to the audio codec 13 might generate pop noise causing discomfort to the user, or even scare the user and causing accident or harm to the user.